package com.java.exer1;

/**
 * @author shkstart
 * @create 2021-01-12 19:06
 */
public class Shape implements SortInter {


    public double area() {
        return 0;
    }

    public double perimeter() {
        return 0;
    }

    @Override
    public int compareTo(Object obj) {
        if (obj == null) {
            return -1;
        }
        if (!(obj instanceof Shape)) {
            return -1;
        }
        Shape rectangle = (Shape) obj;
        if (this.area() > rectangle.area()) {
            return 1;
        } else if (this.area() == rectangle.area()) {
            return 0;
        }
        return -1;
    }
}
